package com.java.function.bean;

public class Person implements Comparable<Person> {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int compare(Person p1, Person p2) {
        return p1.getName().compareTo(p2.getName());
    }

    @Override
    public int compareTo(Person o) {
        o.getName().compareTo(this.getName());

        return 0;
    }
}
